VERSION="1.11.2.5"
OR_PATH="/opt/openresty"
LOR_PATH="/usr/local/lor"
LOR_VERSION="0.3.4"
LOR_DIR="lor-"$LOR_VERSION
DIR="openresty-"$VERSION
SRC_FILE=$DIR".tar.gz"
LOR_FILE="v"$LOR_VERSION".tar.gz"
LOR_URL="https://github.com/sumory/lor/archive/"$LOR_FILE
rm -rf $DIR $SRC_FILE $LOR_FILE
# see: https://openresty.org/cn/installation.html
sudo yum install -y pcre-devel openssl-devel gcc curl 
wget https://openresty.org/download/$SRC_FILE
tar xzvf $SRC_FILE
cd $DIR
./configure \
 --prefix=$OR_PATH/nginx \
 --with-cc-opt=-O2 \
 --add-module=./build/iconv-nginx-module-0.14 \
 --with-ld-opt=-Wl,-rpath,$OR_PATH/luajit/lib \
 --with-http_realip_module \
 --with-stream \
 --with-threads \
 --with-http_v2_module \
 --with-pcre-jit \
 --with-http_ssl_module \
 --build='zouyi build at 20190416'
make -j
sudo make install
wget $LOR_URL
tar xzvf $LOR_FILE 

sudo mv $LOR_DIR $LOR_PATH

